﻿using GZNest.Entity.Spin.System;
using GZNest.Biz.IService;
using GZNest.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GZNest.Biz.Service.Spin.System
{
    public class MachineService : BaseService<Machine>, IMachineService
    {
        public MachineService() : base(RepositoryFactory.MachineRepository) { }

        public bool Exist(int id) { return CurrentRepository.Exist(u => u.Id == id); }

        public bool Exist(string name) { return CurrentRepository.Exist(u => u.Name == name); }

        public Machine Find(int id) { return CurrentRepository.Find(u => u.Id == id); }

        public Machine Find(string name) { return CurrentRepository.Find(u => u.Name == name); }

        //public IQueryable<Machine> FindAll()
        //{
        //    return CurrentRepository.FindList(t => t.Id > 0, "", false);
        //}

        public IQueryable<Machine> FindPageList(int pageIndex, int pageSize, out int totalRecord, int order)
        {
            totalRecord = 0;
            return null;
        }
    }
}
